package com.shouer.doc.widget;

import android.graphics.Rect;
import android.support.v7.widget.RecyclerView;
import android.view.View;

/**
 * Created by YYY-Work on 2017/4/20.
 */

public class OrderItemDecoration extends RecyclerView.ItemDecoration {

    private int space;

    public OrderItemDecoration(int space) {
        this.space = space;
    }


    @Override
    public void getItemOffsets(Rect outRect, View view,
                               RecyclerView parent, RecyclerView.State state) {


        if (parent.getChildLayoutPosition(view) >= 1) {
            outRect.bottom = space;
        }
    }
}
